/**
 * @author bingjun
 *         Date: 7/14/11
 *         Time: 10:59 PM
 */
public class Rectangle {
    public int width = 0;
    public int height = 0;
    public Point origin;

    // four constructors

    public Rectangle() {
        this.origin = new Point(0,0);
    }

    public Rectangle(Point origin) {
        this.origin = origin;
    }

    public Rectangle(int width, int height) {
        this.width = width;
        this.height = height;
        this.origin = new Point(0,0);
    }

    public Rectangle(int width, int height, Point origin) {
        this.width = width;
        this.height = height;
        this.origin = origin;
    }

    // a method for moving the rectangle
    public void move(int x, int y){
        this.origin.x = x;
        this.origin.y = y;
    }

    // a method for computing the area of the rectangle
    public int getArea(){
        return this.width * this.height;
    }
}
